<template>
  <div
    class="component-pc-course__card combo-card-item"
    @click="toPath(detail.id)"
  >
    <div class="new-card-left">
        <img v-lazy="detail.cover" :key="detail.cover" alt="">
    </div>
    <div class="new-card-right">
        <div class="title">
            {{detail.comboName}}
        </div>
        <div class="introduce">
            {{detail.introduce}}
        </div>
        <div class="price">
            <span class="old-price">原价：￥{{detail.price}}</span>
            <span class="new-price"><span style="font-size:14px;">￥</span>{{detail.currentPrice}}</span>
        </div>
    </div>
  </div>
</template>

<script>
import { mapState } from "vuex";
export default {
  props: ["detail"],
  components: {},
  data() {
    return {
    };
  },
  computed: {
  },
  watch: {},
  filter:{
    
  },
  methods: {
    toPath(id) {
      this.$router.push({
        path: "/combo-detail",
        query: {
          id
        }
      });
    },
    
  },
  created() {
    // console.log("=============",this.detail);
  },
  mounted() {}
};
</script>

<style lang="scss" scoped>
.component-pc-course__card {
    
}
.combo-card-item{
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    padding: 25px;
    width: 580px;
    height: 200px;
    background-color: #ffffff;
    border-radius: 4px;
    margin-bottom: 42px;
    margin-left: 10px;
    margin-right: 10px;
    display: flex;
    justify-content: space-between;
    .new-card-left{
        width: 220px;
        height: 150px;
        background-color: #5b96ff;
        border-radius: 4px;
        overflow: hidden;
        img{
            width: 100%;
            height: 100%;
            display: block;
        }
    }
    .new-card-right{
        width: 290px;
        height: 150px;
        // background-color: #5b96ff;
        .title{
            font-size: 16px;
            color: #4a4b4d;
            // font-weight: bold;
            line-height: 20px;
            display: -webkit-box;
            -webkit-line-clamp:2;
            overflow: hidden;
            text-overflow: ellipsis;
            -webkit-box-orient: vertical;
            height: 40px;
            margin-bottom: 7px;
        }
        .introduce{
            height: 56px;
            font-size: 14px;
            // font-weight: bold;
            line-height: 20px;
            // color: #c4c7cc;
            display: -webkit-box;
            -webkit-line-clamp:3;
            overflow: hidden;
            text-overflow: ellipsis;
            -webkit-box-orient: vertical;
        }
        .price{
            text-align: right;
            font-size: 18px;
            // font-weight: bold;
            line-height: 30px;
            // color: #c4c7cc;
            margin-top: 22px;
            .old-price{
                text-decoration: line-through;
            }
            .new-price{
                margin-left: 10px;
                color: #ff7f57;
            }
        }
    }
}
</style>
<style lang="scss">
.component-pc-course__card {
}
</style>
